.user-profile-dialog {
  width: 500px;
  max-width: 650px;
  display: flex;
  flex-direction: column;

  @media (max-width: 768px) {
    width: 100%;
    max-width: 100%;
  }
}

.panel-header {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem 1.5rem 1.25rem 1.5rem;
  border-radius: 10px 10px 0 0;
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);

  .header-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--primary-color);
    border-radius: 10px;


    .header-icon {
      font-size: 1.5rem;
      color: var(--primary-contrast-color);
    }
  }

  .header-text {
    flex: 1;

    .panel-title {
      margin: 0 0 0.25rem 0;
      font-size: 1.25rem;
      font-weight: 600;
      color: var(--text-color);
    }

    .panel-description {
      margin: 0;
      font-size: 0.875rem;
      color: var(--text-secondary-color);
    }
  }

  ::ng-deep .close-button {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;

    .p-button {
      width: 2.5rem;
      height: 2.5rem;

      &:hover {
        background: rgba(0, 0, 0, 0.04);
      }
    }
  }

  @media (max-width: 480px) {
    padding: 1rem 3rem 1rem 1rem;

    .header-icon-wrapper {
      width: 40px;
      height: 40px;

      .header-icon {
        font-size: 1.25rem;
      }
    }

    .header-text {
      .panel-title {
        font-size: 1.125rem;
      }

      .panel-description {
        font-size: 0.8rem;
      }
    }
  }
}

.form-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 2rem;
  background: var(--card-background);
  border: 1px solid var(--border-color);
  border-top: none;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  max-height: 60vh;
  overflow-y: auto;

  &::-webkit-scrollbar {
    width: 6px;
  }

  &::-webkit-scrollbar-track {
    background: var(--overlay-background);
    border-radius: 3px;
  }

  &::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
    transition: background 0.2s ease;

    &:hover {
      background: var(--primary-color);
    }
  }

  @media (max-width: 480px) {
    padding: 1rem;
    gap: 1.25rem;
  }
}

.form-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;

  .section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);

    i {
      color: var(--primary-color);
      font-size: 1.125rem;
    }
  }

  form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;

  .field-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-color);
  }

  .field-input {
    width: 100%;

    &:disabled {
      background-color: var(--surface-100);
      color: var(--text-color-secondary);
      opacity: 0.6;
      cursor: not-allowed;
    }
  }

  ::ng-deep p-password {
    width: 100%;

    .p-password {
      width: 100%;

      .p-inputtext {
        width: 100%;
      }
    }
  }

  .field-value {
    font-size: 1rem;
    color: var(--text-color);
    padding: 0.75rem;
    background: var(--ground-background);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin: 0;
  }

  .field-error {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    color: #ef4444;
    font-size: 0.8125rem;
    margin-top: -0.25rem;

    i {
      font-size: 0.875rem;
    }
  }
}

.edit-actions {
  margin-top: 0.5rem;

  .edit-buttons {
    display: flex;
    gap: 0.75rem;
  }
}

.password-actions {
  margin-top: 0.5rem;
}

.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  gap: 1rem;

  .loading-icon {
    font-size: 2rem;
    color: var(--primary-color);
  }

  p {
    font-size: 1rem;
    color: var(--text-secondary-color);
  }
}
